package ZuoYe02_FangFa_0429;

import ZuoYe01_LeiyuDuiXiang_0428.QiChe;

//2:Automobile
//汽车由发动机，轮胎，车架，底盘组成，
//有外观，价格等属性
//有启动，停止，鸣笛等方法
//发动机有排量，重量，品牌，马力等属性
//汽车启动 由  发动机完成，分为   压缩空气，雾化汽油，点火，排废烟
//四部完成。
//用oo的思想模拟实现这个过程。
public class Autompbile {

	String name;
	String faDongJi;
	String lunTai;
	String cheJia;
	String diPan;

	String waiGuan;
	double jiaGe;
	double youHao;

	double paiLiang;
	double zhongLiang;
	String pinPai;
	int maLi;

	public void zuCheng() {
		System.out.println(name + "由发动机:" + faDongJi + "，轮胎:" + lunTai + "，车架:" + cheJia + "，底盘:" + diPan + "组成");
	}

	public void shuXing() {
		System.out.println("该车外观" + waiGuan + "，价格" + jiaGe + "，油耗" + youHao + "L/100KM");
	}

	public void faDongJiShow() {
		System.out.println("该汽车发动机的排量是：" + paiLiang + "L,重量是：" + zhongLiang + "KG,品牌是：" + pinPai + "马力是：" + maLi);
	}

	public void qiDong() {
		System.out.println(name + "启动！");
		faDongJiQiDong();
	}

	public void tingZhi() {
		System.out.println(name + "停止！");
	}

	public void mingDi() {
		System.out.println(name + "鸣笛！");
	}

	public void faDongJiQiDong() {
		faDongJiShow();
		System.out.println(name + "启动由发动机完成，分为 压缩空气，雾化汽油，点火，排废烟,四步完成！");
	}

	public static void main(String[] args) {
		Autompbile car = new Autompbile();
		car.name = "二手奥拓";
		car.faDongJi = "二手发动机";
		car.lunTai = "二手轮胎";
		car.cheJia = "二手车架";
		car.diPan = "二手底盘";

		car.waiGuan = "红色";
		car.jiaGe = 50000;
		car.youHao = 7.7;

		car.paiLiang = 1.5;
		car.zhongLiang = 80;
		car.pinPai = "EA";
		car.maLi = 113;

		car.zuCheng();
		car.shuXing();
		car.qiDong();
		car.mingDi();
		car.tingZhi();
	}
}
